import 'package:bounce/bounce.dart';
import 'package:flutter/material.dart';
import 'package:zhou_po/assets/color.dart';
import 'package:zhou_po/component/os_svg.dart';

class HomeBtn extends StatefulWidget {
  HomeBtn({super.key});

  @override
  State<HomeBtn> createState() => _HomeBtnState();
}

class _HomeBtnState extends State<HomeBtn> {
  List<String> txt = [
    "风景介绍",
    "就业信息",
    "缴费信息",
    "社保医保",
    "就医信息",
    "三务公开",
    "通知信息",
    "三农政策",
    "老弱病残",
    "政法公开",
  ];
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(left: 10, right: 10, top: 0, bottom: 10),
      padding: EdgeInsets.only(left: 10, right: 10, top: 10, bottom: 10),
      decoration: BoxDecoration(
        color: os_white,
        borderRadius: BorderRadius.circular(15),
      ),
      child: Wrap(
        children: [
          ...List.generate(10, (index) {
            return Bounce(
              onTap: () {},
              child: Container(
                width: (MediaQuery.of(context).size.width - 40) / 5,
                padding: EdgeInsets.symmetric(vertical: 10),
                child: Column(
                  children: [
                    os_svg(path: "lib/img/home/${index + 1}.svg"),
                    Container(height: 7.5),
                    Text(
                      txt[index],
                      style: TextStyle(
                        fontSize: 13,
                      ),
                    ),
                  ],
                ),
              ),
            );
          }),
        ],
      ),
    );
  }
}
